package cn.ywsj.ywsjmidtier.service;

import cn.ywsj.ywsjmidtier.common.Connect;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpSession;

@Api(tags = "信誉信息")
@FeignClient(url = Connect.XSX_URL,name = "xsx")
public interface WechatCreditFeign {

    /**
     * 已还款未还款
     * @param start
     * @param pageSize
     * @return
     */
    @ApiOperation("已还款未还款")
    @PostMapping("/wechat/member/credit/ajaxcreditbill")
    String ajaxCreditBill(@RequestParam("jsonObject")JSONObject jsonObject,@RequestParam("start")Integer start, @RequestParam("pageSize")Integer pageSize);

    /**
     * 我的账单
     * @return
     */
    @ApiOperation("我的账单")
    @PostMapping("wechat/member/credit/querycredittotal")
    String querycredittotal(@RequestParam("jsonObject")JSONObject jsonObject);

    /**
     * 购物车_查询账期支付信息
     * @param orderId
     * @return
     */
    @ApiOperation("购物车_查询账期支付信息")
    @PostMapping("/wechat/member/credit/getcreditaccount")
    String getCreditAccount(@RequestParam("orderId")String orderId);

    /**
     * 我的供应商_保存授信信息
     * @param jsonObject
     * @param session
     * @return
     */
    @ApiOperation("我的供应商_保存授信信息")
    @PostMapping("/wechat/member/credit/toapplymethodforapp")
    String toApplyMethodForApp(@RequestParam("jsonObject")JSONObject jsonObject, @RequestParam("session") HttpSession session);

    /**
     * 购物车_查询授信信息
     * @param toCustId
     * @return
     */
    @ApiOperation("购物车_查询授信信息")
    @PostMapping("/wechat/member/credit/querycreditapplication")
    String queryCreditApplication(@RequestParam("toCustId")String toCustId);

    @PostMapping(value = {"/wechat/member/credit/getbillamountdetail"})
    String getBillAmountDetail(@RequestParam("jsonObject")JSONObject jsonObject);


}

